﻿using System.Text.RegularExpressions;

namespace Decisions.HL7
{
    public class HL7ParserConstants
    {
        // Full New Line or Carriage Return can separate messages
        public static string[] MESSAGE_SEPARATORS = new string[] { System.Environment.NewLine, "\r", "\n" };
        public const string SEGMENT_SEPARATOR = "\r";
        public const char DEFAULT_FIELD_SEP = '|';
        public const char DEFAULT_COMPONENT_SEP = '^';
        public const char DEFAULT_FIELD_REPEAT = '~';
        public const char DEFAULT_ESCAPE = '\\';
        public const char DEFAULT_SUBCOMP_SEP = '&';
        public const string DEFAULT_MESSAGE_SEP = "\r\n";
        public const string DEFAULT_ENCODING_CHARS = "^~\\&";
        

        public const string MSH_START = "MSH";
        public static Regex SEGMENT_START = new Regex(@"[A-Za-z]{3,3}");

        private HL7ParserConstants() { 
            // Never Construct
        }
    }

    public enum HL7TableType
    {
        Undefined = 0,
        User = 1,
        HL7 = 2,
        HL7andUser = 3,
        NoLongerUsed = 4,
        Replaced = 5,
        UserGroupNationalDefined = 6
    }
}